<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 6.2.0">


  <link rel="apple-touch-icon" sizes="180x180" href="https://www.wulihub.com.cn/gc/Wez0VG/images/apple-touch-icon.png">
  <link rel="icon" type="image/png" sizes="32x32" href="https://www.wulihub.com.cn/gc/Wez0VG/images/favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="https://www.wulihub.com.cn/gc/Wez0VG/images/favicon-16x16.png">
  <link rel="mask-icon" href="https://www.wulihub.com.cn/gc/Wez0VG/images/logo.svg" color="#222">

<link rel="stylesheet" href="https://www.wulihub.com.cn/gc/Wez0VG/css/main.css">



<link rel="stylesheet" href="https://npm.elemecdn.com/@fortawesome/fontawesome-free@6.1.1/css/all.min.css" integrity="sha256-DfWjNxDkM94fVBWx1H5BMMp0Zq7luBlV8QRcSES7s+0=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://npm.elemecdn.com/animate.css@3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"nobige.cn","root":"/","images":"https://www.wulihub.com.cn/gc/Wez0VG/images","scheme":"Gemini","darkmode":false,"version":"8.12.2","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":false,"style":null},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"Searching...","empty":"We didn't find any results for the search: ${query}","hits_time":"${hits} results found in ${time} ms","hits":"${hits} results found"},"path":"/search.xml","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false}}</script><script src="https://www.wulihub.com.cn/gc/Wez0VG/js/config.js"></script>

    <meta name="description" content="啥​	frp是啥?简单的说就是外国版的TeamViewer,AnyDesk 国内版的QQ远程桌面,向日葵,DeskTop的控制软件,不同点就是搭建在自己的服务器上,自己去维护.不用在那些软件上充值会员,对服务器的带宽要求也不是很大.3m都可以实现看电影(但有谁会远程看电影?) 准备 服务器一台 被控机 控制机 被控机用软件修改3389端口和开启远程访问 服务器开放端口7000-7100   安装1">
<meta property="og:type" content="article">
<meta property="og:title" content="frp内网穿透安装与配置">
<meta property="og:url" content="https://nobige.cn/post/20210527-frp_nei_wang_chuan_tou_an_zhuang_yu_pei_zhi/index.html">
<meta property="og:site_name" content="NoBige-JackCh3n">
<meta property="og:description" content="啥​	frp是啥?简单的说就是外国版的TeamViewer,AnyDesk 国内版的QQ远程桌面,向日葵,DeskTop的控制软件,不同点就是搭建在自己的服务器上,自己去维护.不用在那些软件上充值会员,对服务器的带宽要求也不是很大.3m都可以实现看电影(但有谁会远程看电影?) 准备 服务器一台 被控机 控制机 被控机用软件修改3389端口和开启远程访问 服务器开放端口7000-7100   安装1">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20210527-frp_nei_wang_chuan_tou_an_zhuang_yu_pei_zhi/fuckqq_2021-05-27_15-59-04.png">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20210527-frp_nei_wang_chuan_tou_an_zhuang_yu_pei_zhi/fuckqq_2021-05-27_16-45-10.png">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20210527-frp_nei_wang_chuan_tou_an_zhuang_yu_pei_zhi/fuckqq_2021-05-27_14-41-16.png">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20210527-frp_nei_wang_chuan_tou_an_zhuang_yu_pei_zhi/fuckqq_2021-05-27_14-42-59.png">
<meta property="og:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20210527-frp_nei_wang_chuan_tou_an_zhuang_yu_pei_zhi/fuckqq_2021-05-27_14-42-12.png">
<meta property="article:published_time" content="2021-05-27T07:08:02.000Z">
<meta property="article:modified_time" content="2024-11-07T02:59:06.310Z">
<meta property="article:author" content="JackCh3n">
<meta property="article:tag" content="frp">
<meta property="article:tag" content="远程">
<meta property="article:tag" content="控制">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20210527-frp_nei_wang_chuan_tou_an_zhuang_yu_pei_zhi/fuckqq_2021-05-27_15-59-04.png">


<link rel="canonical" href="https://nobige.cn/post/20210527-frp_nei_wang_chuan_tou_an_zhuang_yu_pei_zhi/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"en","comments":true,"permalink":"https://nobige.cn/post/20210527-frp_nei_wang_chuan_tou_an_zhuang_yu_pei_zhi/","path":"post/20210527-frp_nei_wang_chuan_tou_an_zhuang_yu_pei_zhi/","title":"frp内网穿透安装与配置"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>frp内网穿透安装与配置 | NoBige-JackCh3n</title>
  
  <script class="next-config" data-name="google_analytics" type="application/json">{"tracking_id":"UA-122817633-1","only_pageview":true}</script>
  <script src="https://www.wulihub.com.cn/gc/Wez0VG/js/third-party/analytics/google-analytics.js"></script>

  <script src="https://www.wulihub.com.cn/gc/Wez0VG/js/third-party/analytics/baidu-analytics.js"></script>
  <script async src="https://hm.baidu.com/hm.js?96741f92c07d010c0ddd1d02197893e2"></script>




  <noscript>
    <link rel="stylesheet" href="https://www.wulihub.com.cn/gc/Wez0VG/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="Toggle navigation bar" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">NoBige-JackCh3n</p>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">copy to my blog</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="home fa-fw"></i>Home</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="user fa-fw"></i>About</a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="tags fa-fw"></i>Tags</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="th fa-fw"></i>Categories</a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="archive fa-fw"></i>Archives</a></li><li class="menu-item menu-item-sitemap"><a href="/sitemap.xml" rel="section"><i class="sitemap fa-fw"></i>Sitemap</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>Search
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup"><div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" maxlength="80"
           placeholder="Searching..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close" role="button">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="search-result-container no-result">
  <div class="search-result-icon">
    <i class="fa fa-spinner fa-pulse fa-5x"></i>
  </div>
</div>

    </div>
  </div>

</div>
        
  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          Table of Contents
        </li>
        <li class="sidebar-nav-overview">
          Overview
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%95%A5"><span class="nav-number">1.</span> <span class="nav-text">啥</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%87%86%E5%A4%87"><span class="nav-number">2.</span> <span class="nav-text">准备</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85"><span class="nav-number">3.</span> <span class="nav-text">安装</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%9C%8D%E5%8A%A1%E7%AB%AF%E9%85%8D%E7%BD%AE"><span class="nav-number">4.</span> <span class="nav-text">服务端配置</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%9C%8D%E5%8A%A1%E7%AB%AF%E5%90%AF%E5%8A%A8"><span class="nav-number">5.</span> <span class="nav-text">服务端启动</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%A2%E6%88%B7%E7%AB%AF%E9%85%8D%E7%BD%AE"><span class="nav-number">6.</span> <span class="nav-text">客户端配置</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BD%BF%E7%94%A8"><span class="nav-number">7.</span> <span class="nav-text">使用</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%B3%A8%E6%84%8F"><span class="nav-number">8.</span> <span class="nav-text">注意</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%8F%82%E8%80%83"><span class="nav-number">9.</span> <span class="nav-text">参考</span></a></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="JackCh3n"
      src="https://www.wulihub.com.cn/gc/Wez0VG/images/avatar.png">
  <p class="site-author-name" itemprop="name">JackCh3n</p>
  <div class="site-description" itemprop="description">Record the pit filling process with words</div>
</div>
<div class="site-state-wrap site-overview-item animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">146</span>
          <span class="site-state-item-name">posts</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">42</span>
        <span class="site-state-item-name">categories</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/tags/">
        <span class="site-state-item-count">279</span>
        <span class="site-state-item-name">tags</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author site-overview-item animated">
      <span class="links-of-author-item">
        <a href="https://github.com/jackch3n" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;jackch3n" rel="noopener" target="_blank"><i class="github fa-fw"></i>GitHub</a>
      </span>
  </div>


  <div class="links-of-blogroll site-overview-item animated">
    <div class="links-of-blogroll-title"><i class="fa fa-globe fa-fw"></i>
      Links
    </div>
    <ul class="links-of-blogroll-list">
        <li class="links-of-blogroll-item">
          <a href="https://vercel.com/?f=nobige" title="https:&#x2F;&#x2F;vercel.com?f&#x3D;nobige" rel="noopener" target="_blank">vercel</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="https://www.jsdelivr.com/?f=nobige" title="https:&#x2F;&#x2F;www.jsdelivr.com?f&#x3D;nobige" rel="noopener" target="_blank">jsdelivr</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="https://www.upyun.com/?f=nobige" title="https:&#x2F;&#x2F;www.upyun.com?f&#x3D;nobige" rel="noopener" target="_blank">upyun</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="https://coding.net/?f=nobige" title="https:&#x2F;&#x2F;coding.net?f&#x3D;nobige" rel="noopener" target="_blank">coding</a>
        </li>
        <li class="links-of-blogroll-item">
          <a href="https://unsplash.com/?f=nobige" title="https:&#x2F;&#x2F;unsplash.com?f&#x3D;nobige" rel="noopener" target="_blank">unsplash</a>
        </li>
    </ul>
  </div>

        </div>
      </div>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="back-to-top" role="button" aria-label="Back to top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="en">
    <link itemprop="mainEntityOfPage" href="https://nobige.cn/post/20210527-frp_nei_wang_chuan_tou_an_zhuang_yu_pei_zhi/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="https://www.wulihub.com.cn/gc/Wez0VG/images/avatar.png">
      <meta itemprop="name" content="JackCh3n">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="NoBige-JackCh3n">
      <meta itemprop="description" content="Record the pit filling process with words">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="frp内网穿透安装与配置 | NoBige-JackCh3n">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          frp内网穿透安装与配置
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">Posted on</span>

      <time title="Created: 2021-05-27 15:08:02" itemprop="dateCreated datePublished" datetime="2021-05-27T15:08:02+08:00">2021-05-27</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar-check"></i>
      </span>
      <span class="post-meta-item-text">Edited on</span>
      <time title="Modified: 2024-11-07 10:59:06" itemprop="dateModified" datetime="2024-11-07T10:59:06+08:00">2024-11-07</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">In</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/linux/" itemprop="url" rel="index"><span itemprop="name">linux</span></a>
        </span>
    </span>

  
    <span class="post-meta-item" title="Views" id="busuanzi_container_page_pv">
      <span class="post-meta-item-icon">
        <i class="far fa-eye"></i>
      </span>
      <span class="post-meta-item-text">Views: </span>
      <span id="busuanzi_value_page_pv"></span>
    </span>
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <h2 id="啥"><a href="#啥" class="headerlink" title="啥"></a>啥</h2><p>​	frp是啥?简单的说就是外国版的TeamViewer,AnyDesk 国内版的QQ远程桌面,向日葵,DeskTop的控制软件,不同点就是搭建在自己的服务器上,自己去维护.不用在那些软件上充值会员,对服务器的带宽要求也不是很大.3m都可以实现看电影(但有谁会远程看电影?)</p>
<h2 id="准备"><a href="#准备" class="headerlink" title="准备"></a>准备</h2><ul>
<li>服务器一台</li>
<li>被控机</li>
<li>控制机</li>
<li>被控机用<a href="/go.html?u=https://www.baidu.com/s?wd=%E6%AD%A5%E8%81%94%E7%AB%AF%E5%8F%A3%E4%BF%AE%E6%94%B9%E8%BD%AF%E4%BB%B6">软件修改</a>3389端口和开启远程访问</li>
<li>服务器开放端口7000-7100</li>
</ul>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20210527-frp_nei_wang_chuan_tou_an_zhuang_yu_pei_zhi/fuckqq_2021-05-27_15-59-04.png" alt="修改3389端口和开启远程访问"></p>
<h2 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 获取版本号</span></span><br><span class="line"><span class="built_in">export</span> FRP_VERSION=$(wget -qO- -t1 -T2 <span class="string">&quot;https://api.github.com/repos/fatedier/frp/releases/latest&quot;</span> | grep <span class="string">&quot;tag_name&quot;</span> | <span class="built_in">head</span> -n 1 | awk -F <span class="string">&quot;:&quot;</span> <span class="string">&#x27;&#123;print $2&#125;&#x27;</span> | sed <span class="string">&#x27;s/\&quot;//g;s/,//g;s/ //g&#x27;</span>)</span><br><span class="line"><span class="built_in">echo</span> <span class="string">&quot;最新版本为&quot;</span><span class="variable">$&#123;FRP_VERSION&#125;</span></span><br><span class="line"><span class="comment"># 创建文件夹</span></span><br><span class="line">sudo <span class="built_in">mkdir</span> -p /etc/frp</span><br><span class="line"><span class="comment"># 进入目录</span></span><br><span class="line"><span class="built_in">cd</span> /etc/frp</span><br><span class="line"><span class="comment"># 下载最新版本</span></span><br><span class="line">sudo wget <span class="string">&quot;https://github.com/fatedier/frp/releases/download/v<span class="variable">$&#123;FRP_VERSION&#125;</span>/frp_<span class="variable">$&#123;FRP_VERSION&#125;</span>_linux_amd64.tar.gz&quot;</span></span><br><span class="line"><span class="comment"># 解压</span></span><br><span class="line">sudo tar xzvf frp_<span class="variable">$&#123;FRP_VERSION&#125;</span>_linux_amd64.tar.gz</span><br><span class="line"><span class="comment"># 重命名</span></span><br><span class="line">sudo <span class="built_in">mv</span> frp_<span class="variable">$&#123;FRP_VERSION&#125;</span>_linux_amd64/* /etc/frp</span><br><span class="line"></span><br><span class="line"><span class="comment"># ————————————————</span></span><br><span class="line"><span class="comment"># 日期:2021-05-27</span></span><br><span class="line"><span class="comment"># 参考链接：https://www.yeslu.cn/archives/3a47af3d.html</span></span><br></pre></td></tr></table></figure>

<h2 id="服务端配置"><a href="#服务端配置" class="headerlink" title="服务端配置"></a>服务端配置</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 配置frp服务端</span></span><br><span class="line">sudo vim /etc/frp/frps.ini</span><br><span class="line"></span><br><span class="line"><span class="comment"># 配置信息</span></span><br><span class="line">[common]</span><br><span class="line"><span class="comment"># 绑定的端口号</span></span><br><span class="line">bind_port = 1024</span><br><span class="line"><span class="comment"># dashboard_addr = 0.0.0.0</span></span><br><span class="line"><span class="comment"># 控制面板端口号</span></span><br><span class="line">dashboard_port = 7000</span><br><span class="line"><span class="comment"># 仪表盘访问的用户名密码，如果不设置，则默认都是 admin</span></span><br><span class="line">dashboard_user = nobige</span><br><span class="line">dashboard_pwd = nobigePassword</span><br><span class="line"><span class="comment"># auth token</span></span><br><span class="line">token = nobigeToken</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># 使用systemctl配置后台运行和开机自启</span></span><br><span class="line">sudo vim /lib/systemd/system/frps.service</span><br><span class="line"></span><br><span class="line"><span class="comment"># 配置信息</span></span><br><span class="line">[Unit]</span><br><span class="line">Description=fraps service</span><br><span class="line">After=network.target syslog.target</span><br><span class="line">Wants=network.target</span><br><span class="line">[Service]</span><br><span class="line">Type=simple</span><br><span class="line"><span class="comment"># 启动服务的命令（此处写你的frps的实际安装目录）</span></span><br><span class="line">ExecStart=/etc/frp/frps -c /etc/frp/frps.ini</span><br><span class="line">[Install]</span><br><span class="line">WantedBy=multi-user.target</span><br></pre></td></tr></table></figure>

<h2 id="服务端启动"><a href="#服务端启动" class="headerlink" title="服务端启动"></a>服务端启动</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 启动frp</span></span><br><span class="line">sudo systemctl start frps</span><br><span class="line"><span class="comment"># 打开自启动</span></span><br><span class="line">sudo systemctl <span class="built_in">enable</span> frps</span><br><span class="line"><span class="comment"># 重启应用，</span></span><br><span class="line">sudo systemctl restart frps</span><br><span class="line"><span class="comment"># 停止应用</span></span><br><span class="line">sudo systemctl stop frps</span><br><span class="line"><span class="comment"># 查看应用的日志</span></span><br><span class="line">sudo systemctl status frps</span><br><span class="line"></span><br><span class="line"><span class="comment"># 开放端口</span></span><br><span class="line">sudo firewall-cmd --zone=public --add-port=7000/tcp --permanent</span><br><span class="line"><span class="comment"># 防火墙重启</span></span><br><span class="line">sudo firewall-cmd --reload</span><br><span class="line"></span><br><span class="line"><span class="comment"># 如果端口被占用,找到其进程并对其结束</span></span><br><span class="line"><span class="comment"># 查看端口号 </span></span><br><span class="line">netstat -anp|grep 7000</span><br><span class="line"><span class="comment"># 查看端口号</span></span><br><span class="line">lsof -i:7000</span><br><span class="line"><span class="comment"># 查看程序进程 </span></span><br><span class="line">ps -ef|grep frps</span><br><span class="line"><span class="comment"># 结束进程</span></span><br><span class="line"><span class="built_in">kill</span> -9 进程号</span><br></pre></td></tr></table></figure>

<h2 id="客户端配置"><a href="#客户端配置" class="headerlink" title="客户端配置"></a>客户端配置</h2><ul>
<li>下载win最新版的<a href="/go.html?u=https://github.com/fatedier/frp/releases/">frp客户端</a>解压到D盘的目录下,如<code>D:\xiao\frp</code></li>
<li>创建一个<code>frp.ini</code>日志文件,<code>frp.bat</code>批处理文件</li>
</ul>
<p><code>frp.bat</code>配置</p>
<figure class="highlight bat"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">@<span class="built_in">echo</span> off</span><br><span class="line">:home</span><br><span class="line">frpc -c frpc.ini &gt;&gt; frp.log</span><br><span class="line"><span class="keyword">goto</span> home</span><br></pre></td></tr></table></figure>

<ul>
<li>根据情况配置<code>frpc.ini</code></li>
</ul>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 配置信息</span></span><br><span class="line">[common]</span><br><span class="line"><span class="comment"># 服务器IP,可以是ip也可以是域名</span></span><br><span class="line">server_addr = frp.tiiao.cn </span><br><span class="line"><span class="comment"># 主端口</span></span><br><span class="line">server_port = 1024</span><br><span class="line">token =nobigeToken</span><br><span class="line"><span class="comment"># 名称，作为标注</span></span><br><span class="line">[nobige]</span><br><span class="line"><span class="comment"># 服务类型，远程桌面需要tcp</span></span><br><span class="line"><span class="built_in">type</span> = tcp</span><br><span class="line"><span class="comment"># 本机</span></span><br><span class="line">local_ip = 127.0.0.1</span><br><span class="line"><span class="comment"># 远程桌面的端口号</span></span><br><span class="line">local_port = 2048</span><br><span class="line"><span class="comment">#服务器开放的子端口</span></span><br><span class="line">remote_port = 7001</span><br></pre></td></tr></table></figure>

<p>打开系统自带的<code>任务计划程序</code>并创建一个frp启动任务.并参考下图配置.</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20210527-frp_nei_wang_chuan_tou_an_zhuang_yu_pei_zhi/fuckqq_2021-05-27_16-45-10.png" alt="创建任务计划"></p>
<p>常规配置</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20210527-frp_nei_wang_chuan_tou_an_zhuang_yu_pei_zhi/fuckqq_2021-05-27_14-41-16.png" alt="常规配置"></p>
<p>触发器</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20210527-frp_nei_wang_chuan_tou_an_zhuang_yu_pei_zhi/fuckqq_2021-05-27_14-42-59.png" alt="触发器"></p>
<p>操作</p>
<p><img src="https://blog-static.nobige.cn/gh/JackCh3n/n0bige/post/20210527-frp_nei_wang_chuan_tou_an_zhuang_yu_pei_zhi/fuckqq_2021-05-27_14-42-12.png" alt="操作"></p>
<h2 id="使用"><a href="#使用" class="headerlink" title="使用"></a>使用</h2><ul>
<li>以远程桌面为例,用系统自带远程桌面,地址为<code>frp.tiiao.cn:7001</code></li>
<li>也可以适用于nginx或是其他服务.只需要在客户端添加绑定端口和服务端端口即可</li>
<li>其他端口可参考<a href="https://nobige.cn/post/20201211-chang_yong_duan_kou_zheng_li/">常用端口整理</a></li>
</ul>
<h2 id="注意"><a href="#注意" class="headerlink" title="注意"></a>注意</h2><ol>
<li>被控端密码尽量复杂</li>
<li>被控端的3389默认端口一定要修改</li>
<li>服务端防火墙最好限制端口访问</li>
</ol>
<p>如果没有做到,可能导致因为局域网部分机器中勒索病毒而受牵连!中过多次勒索病毒的经验.</p>
<h2 id="参考"><a href="#参考" class="headerlink" title="参考"></a>参考</h2><ul>
<li><a href="/go.html?u=https://www.jianshu.com/p/3ed3f985f35b">https://www.jianshu.com/p/3ed3f985f35b</a></li>
<li><a href="/go.html?u=https://www.guger.top/index.php/2020/06/10/%E5%9F%BA%E4%BA%8Efrp%E5%86%85%E7%BD%91%E7%A9%BF%E9%80%8F%E7%9A%84windows%E8%BF%9C%E7%A8%8B%E6%A1%8C%E9%9D%A2%E7%9A%84%E6%90%AD%E5%BB%BA/">https://www.guger.top/index.php/2020/06/10/基于frp内网穿透的windows远程桌面的搭建/</a></li>
</ul>

    </div>

    
    
    

    <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/frp/" rel="tag"># frp</a>
              <a href="/tags/%E8%BF%9C%E7%A8%8B/" rel="tag"># 远程</a>
              <a href="/tags/%E6%8E%A7%E5%88%B6/" rel="tag"># 控制</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/post/20210428-shuang_wang_ka_she_zhi_nei_wai_wang_tong_shi_qi_yong/" rel="prev" title="双网卡设置内外网同时启用">
                  <i class="fa fa-chevron-left"></i> 双网卡设置内外网同时启用
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/post/20210527-jquery_chang_yong_he_sao_cao_zuo/" rel="next" title="JQuery常用和骚操作">
                  JQuery常用和骚操作 <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






    
  <div class="comments" id="disqus_thread">
    <noscript>Please enable JavaScript to view the comments powered by Disqus.</noscript>
  </div>
  
</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 
  <span itemprop="copyrightYear">2024</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">JackCh3n</span>
</div>
<div class="busuanzi-count">
    <span class="post-meta-item" id="busuanzi_container_site_uv">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="Total Visitors">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-item" id="busuanzi_container_site_pv">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="Total Views">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>
  <div class="powered-by">Powered by <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/" rel="noopener" target="_blank">NexT.Gemini</a>
  </div>
    <br/>Powerful CDN service provided by 
  <a target="_blank" rel="noopener" href="https://www.upyun.com/?utm_source=lianmeng&utm_medium=referral" style="border:none"><img src="https://www.wulihub.com.cn/gc/Wez0VG/images/upyun_logo.png" height="66" style="display: list-item;" alt="upyun"></a> 
  <a target="_blank" rel="noopener" href="https://www.jsdelivr.com" style="border:none"><img src="https://www.wulihub.com.cn/gc/Wez0VG/images/jsdelivr_logo.svg" height="50" style="display: list-item;" alt="JsDelivr"></a>
  <p>
  <br/><a target="_blank" rel="noopener" href="https://pages.github.com/?f=nobige">Github Pages</a>&nbsp;&nbsp;<a target="_blank" rel="noopener" href="https://vercel.com/?f=nobige">Vercel</a>&nbsp;&nbsp;<a target="_blank" rel="noopener" href="https://www.netlify.com/?f=nobige">Netlify</a>&nbsp;&nbsp;<a target="_blank" rel="noopener" href="https://coding.net/?f=nobige">coding</a>&nbsp;&nbsp;provides static publishing
  </p>

    </div>
  </footer>

  
  <script src="https://npm.elemecdn.com/animejs@3.2.1/lib/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="https://www.wulihub.com.cn/gc/Wez0VG/js/comments.js"></script><script src="https://www.wulihub.com.cn/gc/Wez0VG/js/utils.js"></script><script src="https://www.wulihub.com.cn/gc/Wez0VG/js/motion.js"></script><script src="https://www.wulihub.com.cn/gc/Wez0VG/js/next-boot.js"></script>

  
<script src="https://npm.elemecdn.com/hexo-generator-searchdb@1.4.0/dist/search.js" integrity="sha256-vXZMYLEqsROAXkEw93GGIvaB2ab+QW6w3+1ahD9nXXA=" crossorigin="anonymous"></script>
<script src="https://www.wulihub.com.cn/gc/Wez0VG/js/third-party/search/local-search.js"></script>





  
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>




<link rel="stylesheet" href="https://npm.elemecdn.com/disqusjs@1.3.0/dist/disqusjs.css" integrity="sha256-GxdCIOyfxQ1OBfS99qAIJDoGK1ADuBsxhMTqXG82fAY=" crossorigin="anonymous">

<script class="next-config" data-name="disqusjs" type="application/json">{"enable":true,"api":"https://duosuo.nobige.cn/","apikey":"Kmo9kPwsir7ppp8tGpeGROCmUtW8tdZBOdBVowPC67xVfTS5uV1wr6s4kckvP95m","shortname":"nobige","js":{"url":"https://npm.elemecdn.com/disqusjs@1.3.0/dist/disqus.js","integrity":"sha256-LVaMHPQ2zLqOc5rXSAfr4d1PIkEGNLyyUTDNPZmTtUw="}}</script>
<script src="https://www.wulihub.com.cn/gc/Wez0VG/js/third-party/comments/disqusjs.js"></script>

</body>
</html>
